/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 */

#ifndef __TSIN_UTIL_GFXTIMER_HPP__
#define __TSIN_UTIL_GFXTIMER_HPP__

#include <tsin/util/common.hpp>

#include <tsin/util/Timer.hpp>
#include <tsin/config/Config.hpp>

namespace tsin {

        /**
         * @class GFXTimer
         * @ingroup util
         * @brief Timer implementation based on SDL_gfx library.
         *
         * @warning {Must be used after SDL is properly initialized.}
         */
        class UTIL_DLLEXPORT GFXTimer : public Timer
        {
        public:
                GFXTimer();

                /**
                 * Initialize the timer using the FPS specified in the config.
                 *
                 * @param config Configuration of which the fps is used.
                 */
                GFXTimer(Config &config);

                virtual void setFps(int fps);
                virtual void setInterval(int msec);
                virtual void delay();
        };

}

#endif /* __TSIN_UTIL_GFXTIMER_HPP__ */
